package factorymodel.simplefactorymodel.factory;

import factorymodel.simplefactorymodel.pojo.car;
import factorymodel.simplefactorymodel.pojo.entity.huaWeiCar;
import factorymodel.simplefactorymodel.pojo.entity.xiaoMiCar;

public class carSimpleFactory {
    public car createCar(String carName)
    {
        if(carName.equals("huaWei"))
        {
            return new huaWeiCar();
        }
        else if(carName.equals("xiaoMi"))
        {
            return new xiaoMiCar();
        }
        else return null;
    }
}
